<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Jetbrains-Help</title>
    <link rel="stylesheet" type="text/css" href="/css/index.css">
    <link rel="icon" href="https://www.jetbrains.com/favicon.ico?r=1234">
</head>
<body>
<header class="tip sticky flex items-center py-6">
    <p>
        🇨🇳 Download <a href="ja-netfilter" title="Download jetbra first">ja-netfilter.zip</a> , and configure
        your JetBrains's <a onclick="showVmoptins()">vmoptions!</a> <br>
        🇨🇳 Also you can <a onclick="showLicenseForm()">Refill license information</a> to customizer your license!</br>
        <strong>🇨🇳 Please note that this page is only developed and used by <span
                th:text="${defaults.getDefaultLicenseName()} + '/' + ${defaults.getDefaultAssigneeName()}"></span>
            personally!</strong>
    </p>
    <form class="parent">
        <input type="text" class="search" id="search" placeholder="Search Product or Plugin">
    </form>
</header>
<main id="product-list" class="px-6 z-grid py-10" style="--space: 20rem; --gutter: 3.5rem">
    <th:block th:fragment="product-list">
        <th:block th:each="product:${products}">
            <article class="card" th:data-product="${product.getName()}"
                     th:data-product-codes="${product.getProductCode()}">
                <header>
                    <div class="flex items-center justify-between px-6 pt-1 pb-0 bg-card radius-1">
                        <div class="avatar-wrapper flex items-center justify-center overflow-hidden shrink-0">
                            <div class="icon" th:classappend="${product.getIconClass()}" role="img"></div>
                        </div>
                    </div>
                    <hr/>
                </header>
                <div class="pd-6 overflow-hidden bg-card container radius-1">
                    <h1 class="truncate truncate-1 color-primary mt-0 overflow-ellipsis" th:title="${product.getName()}"
                        th:text="${product.getName()}"></h1>
                    <p title="Copy to clipboard" class="truncate text-sm text-grey" onclick="copyLicense(this)"
                       data-content="Copy to clipboard">
                        **********
                    </p>
                </div>
                <div class="mask"></div>
                <div class="mask mask-c-1"></div>
            </article>
        </th:block>
        <th:block th:each="plugin:${plugins}">
            <article class="card" th:data-product="${plugin.getName()}"
                     th:data-product-codes="${plugin.getProductCode()}">
                <header>
                    <div class="flex items-center justify-between px-6 pt-1 pb-0 bg-card radius-1">
                        <div class="avatar-wrapper flex items-center justify-center overflow-hidden shrink-0">
                            <div class="icon" role="img"
                                 th:style="'background-image: url(' + ${plugin.getIcon()} + ')'"></div>
                        </div>
                    </div>
                    <hr/>
                </header>
                <div class="pd-6 overflow-hidden bg-card container radius-1">
                    <h1 class="truncate truncate-1 color-primary mt-0 overflow-ellipsis" th:title="${plugin.getName()}"
                        th:text="${plugin.getName()}"></h1>
                    <p title="Copy to clipboard" class="truncate text-sm text-grey" onclick="copyLicense(this)"
                       data-content="Copy to clipboard">
                        **********
                    </p>
                </div>
                <div class="mask"></div>
                <div class="mask mask-c-1"></div>
            </article>
        </th:block>
    </th:block>
</main>
<div id="mask"
     style="position:fixed;top:0;left:0;z-index:998;width:100%;height:100%;display:none;background-color:#000;opacity:0.5;overflow:hidden;"></div>
<div id="form" style="position:fixed;top:20%;left:40%;width:40%;height:500px;z-index:999;display:none;">
    <div class="form">
        <div class="title">License Form</div>
        <div class="subtitle">Customization is welcome</div>
        <div class="input-container ic1">
            <input id="licenseeName" class="input" type="text" placeholder=" "
                   th:value="${defaults.getDefaultLicenseName()}"/>
            <div class="cut"></div>
            <label for="licenseeName" class="placeholder">License Name</label>
        </div>
        <div class="input-container ic2">
            <input id="assigneeName" class="input" type="text" placeholder=" "
                   th:value="${defaults.getDefaultAssigneeName()}"/>
            <div class="cut"></div>
            <label for="assigneeName" class="placeholder">Assigne Name</label>
        </div>
        <div class="input-container ic2">
            <input id="expiryDate" class="input" type="text" placeholder=""
                   th:value="${defaults.getDefaultExpiryDate()}"/>
            <div class="cut cut-short"></div>
            <label for="expiryDate" class="placeholder">Expiry Date</label>
        </div>
        <button class="submit" onclick="submitLicenseInfo(this)">Confirm</button>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/index.js"></script>
</html>